package com.qfjy.service.impl.example6;

import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Service;

import java.util.Date;

@Service
@Slf4j
public class UserRegisterServiceImpl {
    /**
     * 用户 邮件发送
     */
    @RabbitListener(queues = {"delayed.queue.user.register"})
    public void sendEmail(String uname){
        //相关业务逻辑---》
        log.info("用户发送邮件成功--》"+uname+"\t"+new Date().toString());
    }
}